package com.itdct.onflow.core.config

import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import java.util.concurrent.*

/**
 * @author Zhouwx
 * @date 2025/7/19 23:55:41
 * @version 1.0
 * @description
 */
@Configuration
class ThreadPoolConfig {
    @Bean("logThreadPoolExecutor")
    fun logThreadPoolExecutor(): ExecutorService {
        val executorService = Executors.newVirtualThreadPerTaskExecutor()
        return executorService
    }

    @Bean("virtualThreadPoolExecutor")
    fun virtualThreadPoolExecutor(): ExecutorService {
        val executorService = Executors.newVirtualThreadPerTaskExecutor()
        return executorService
    }
}

